package xixirupan.tmgp.tencent.com.vmeim.ui.beautycircle.view;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.sch.rfview.AnimRFRecyclerView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import xixirupan.tmgp.tencent.com.vmeim.R;
import xixirupan.tmgp.tencent.com.vmeim.ui.beautycircle.presenter.EssensePresenter;

/**
 * Created by lenovo on 2016/10/20.
 */

public class EssenseFragment extends Fragment {
    @BindView(R.id.aniRecyclerView_essense)
    AnimRFRecyclerView aniRecyclerViewEssense;
    private  Unbinder bind;
    EssensePresenter presenter ;
    private Context context;
    int pageNo =1;
    int pageSize =20;

    @Override
    public void onAttach(Context context) {

        super.onAttach(context);
        this.context =context;

    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_essense_layout, container, false);
         bind = ButterKnife.bind(this, view);
        presenter =new EssensePresenter(aniRecyclerViewEssense,context,inflater);
        presenter.initRecycler(pageSize,pageNo);
        //加载更多数据
        presenter.reloadData();
        return view;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        bind.unbind();
    }
}
